package com.cangshi.service;


import com.cangshi.dao.GoodsTypeMapper;
import com.cangshi.entity.GoodsType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Eoly on 2017/1/16.
 */
@Service("goodsTypeService")
public class GoodsTypeServiceImpl implements GoodsTypeService{

    @Autowired
    GoodsTypeMapper goodsTypeMapper;

    public GoodsType findByGoodsTypeId(Integer goodsTypeId) {
        return goodsTypeMapper.selectByPrimaryKey(goodsTypeId);
    }

    public List<GoodsType> findAllGoodsTypes() {
        return goodsTypeMapper.selectAll();
    }
}
